package com.zhanjixun.weixin.conts;

import lombok.Getter;

/**
 * @author :zhanjixun
 * @date : 2018/11/23 12:25
 */
public enum AppMsgType {
    LINK(5, "分享链接"),
    FILE(6, "分享文件"),
    MINI_PROGRAM(33, "小程序");

    AppMsgType(int code, String description) {

    }

    @Getter
    private int code;
    @Getter
    private String description;

    public static AppMsgType getMsgTypeByCode(int code) {
        for (AppMsgType msgType : AppMsgType.values()) {
            if (code == msgType.getCode()) {
                return msgType;
            }
        }
        return null;
    }
}
